import HelloWorld from '@/components/HelloWorld'
import {
  Login,
  User,
  Content,
  Product,
  Order,
  FlowLog,
  Dashboard,
  Detail,
  SQL,
  Subject,
  Message,
  Shop,
  TestPaper,
  Coupon
} from '../views/'
import {
  Home
} from '../layout/'


export default [{
    path: '/',
    name: 'cms',
    redirect: '/login'
  },
  {
    path: '/login',
    name: '登录',
    hidden: true,
    meta: {
      noRequireAuth: true,
      application: ['notInTab', 'notInAuth']
    },
    component: Login
  },
  {
    path: '/home',
    name: 'home',
    component: Home,
    meta: {},
    children: [{
        path: 'dashboard',
        name: '财务统计',
        component: Dashboard.Dashboard
      },{
        path: 'data',
        name: '统计数据',
        component: Dashboard.Data
      },

      {
        path: 'adminLists',
        name: '管理员列表',
        component: User.AdminLists
      },
      {
        path: 'role',
        name: '角色管理',
        component: User.Role
      },
      {
        path: 'access',
        name: '权限管理',
        component: User.Access
      },
      {
        path: 'thirdApp',
        name: '平台信息',
        component: User.ThirdApp
      },
      {
        path: 'config',
        name: '项目配置',
        component: User.Config
      },
      {
        path: 'user',
        name: '普通用户管理',
        component: User.User
      },
      {
        path: 'personal',
        name: '子管理员管理',
        component: User.Personal
      },
      {
        path: 'staff',
        name: '业务员管理',
        component: User.Staff
      },
      {
        path: 'child/:parent_no',
        name: '推广成员',
        meta: {
          clearFullPath: '/home/child',
          noKeepAlive: true // 不需要被缓存
        },
        component: User.Child
      },



      {
        path: 'shop',
        name: '入驻商家',
        component: Shop.Shop
      },
      {
        path: 'shopper/:shop_no',
        name: '店长管理',
        meta: {
          clearFullPath: '/home/shopper',
          noKeepAlive: true // 不需要被缓存
        },
        component: Shop.Shopper
      },
      {
        path: 'shopLabel',
        name: '商家类别',
        component: Shop.ShopLabel
      },
      {
        path: 'shopProduct/:shop_no',
        name: '商家商品管理',
        meta: {
          clearFullPath: '/home/shopProduct',
          noKeepAlive: true // 不需要被缓存
        },
        component: Shop.ShopProduct
      },
      {
        path: 'shopInnerLabel/:shop_no',
        name: '商品类别管理',
        meta: {
          clearFullPath: '/home/shopInnerLabel',
          noKeepAlive: true // 不需要被缓存
        },
        component: Shop.ShopInnerLabel
      },



      {
        path: 'label',
        name: '文章菜单管理',
        component: Content.Label
      },
      {
        path: 'articleLists',
        name: '轮播管理',
        component: Content.ArticleLists
      },
      {
        path: 'article',
        name: '平台文章',
        component: Content.Article
      },
      {
        path: 'notice',
        name: '公告管理',
        component: Content.Notice
      },
      {
        path: 'region',
        name: '区域管理',
        component: Content.Region
      },



      {
        path: 'message',
        name: '留言管理',
        component: Message.Message
      },



      {
        path: 'productLabel',
        name: '商品类别',
        component: Product.ProductLabel
      },
      {
        path: 'product',
        name: '平台商品',
        component: Product.Product
      },


      {
        path: 'productpage/:shop_no',
        name: '商家商品详情',
        meta: {
          clearFullPath: '/home/productpage',
          noKeepAlive: true // 不需要被缓存
        },
        component: Detail.Productpage
      },

      {
        path: 'productdetail/:product_id',
        name: '平台商品详情',
        meta: {
          clearFullPath: '/home/productdetail',
          noKeepAlive: true // 不需要被缓存
        },
        component: Detail.Productdetail
      },



      {
        path: 'coupon',
        name: '优惠券列表',
        component: Coupon.Coupon
      },
      {
        path: 'coupons',
        name: '其他优惠券',
        component: Coupon.Coupons
      },



      {
        path: 'order',
        name: '商品订单',
        component: Order.Order
      },
      {
        path: 'xorder:user_no',
        name: '订单列表',
        meta: {
          clearFullPath: '/home/xorder',
          noKeepAlive: true // 不需要被缓存
        },
        component: Order.Xorder
      },
      {
        path: 'torder',
        name: '商城团购订单',
        component: Order.Torder
      },



      {
        path: 'pay',
        name: '支付流水',
        component: FlowLog.Pay
      },
      {
        path: 'balance',
        name: '奖励金流水',
        component: FlowLog.Balance
      },
      {
        path: 'score',
        name: '积分流水',
        component: FlowLog.Score
      },
      {
        path: 'withdraw',
        name: '提现管理',
        component: FlowLog.Withdraw
      },



      {
        path: 'sql',
        name: '数据备份',
        component: SQL.Sql
      },
      {
        path: 'record',
        name: '操作记录',
        component: SQL.Record
      },

      {
        path: 'paper',
        name: '试卷管理',
        component:TestPaper.Paper
      },
      {
        path: 'paperSubject/:id',
        name: '管理题目(试卷)',
        meta: {
                clearFullPath: '/home/paperSubject',
                noKeepAlive: true // 不需要被缓存
            },
        component:TestPaper.PaperSubject
      },

    ]
  }
]
